package com.sl.au.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 销售机会 可见性：谁创建的提交给上级分配，在机会传递表中查找可见机会
 * 
 */
@Entity
@Table(name = "sl_crm_chance")
public class Chance extends Root {
	/**
	 * 所属行业 
	 */
	@Column(name = "business")
	private String business;
	@Column(name = "contractId")
	private String contractId;

	public String getContractId() {
		return contractId;
	}
	public void setContractId(String contractId) {
		this.contractId = contractId;
	}
	public String getBusiness() {
		return business;
	}

	public void setBusiness(String business) {
		this.business = business;
	}

	/**
	 * 机会名称
	 */
	@Column(name = "sName", nullable = false)
	private String name;
	
	/**
	 * 信息提供人片区
	 */
	@Column(name = "sSourceArea")
	private String sourceArea;
	
	/**
	 * 信息类型
	 */
	@Column(name = "sSourceType")
	private String sourceType;
	
	/**
	 * 信息优先级
	 * 每项从一个* 到5个*
	 */
	@Column(name = "sChancePriority")
	private String chancePriority;
	
	/**
	 * 机会来源
	 */
	@Column(name = "sSource")
	private String source;
	
	/**
	 * 信息来源单位
	 */
	@Column(name = "sSourceUnit")
	private String sourceUnit;
	
	/**
	 * 信息所属部门
	 */
	@Column(name = "sSourceSuperior")
	private String sourceSuperior;
	
	/**
	 * 提供信息人资料
	 */
	@Column(name = "sSourceOfferInfo")
	private String sourceOfferInfo;
	
	/**
	 * 项目动态
	 */
	@Column(name = "sProjectState")
	private String projectState;
	
	/**
	 * 设备情况
	 */
	@Column(name = "sDeviceState")
	private String deviceState;
	
	/**
	 * 信息提供方影响力
	 */
	@Column(name = "sSourcePower")
	private String sourcePower;
	
	/**
	 * 预计订货量
	 */
	@Column(name = "nOrderAmount")
	private Integer orderAmount;
	
	/**
	 * 订货单位
	 */
	@Column(name = "sOrderUnit")
	private String orderUnit;
	
	/**
	 * 订货单位ID
	 */
	@Column(name = "sCustomerId")
	private String customerId;
	
	/**
	 * 订货联系人
	 */
	@Column(name = "sOrderPerson")
	private String orderPerson;
	
	/**
	 * 联系方式
	 */
	@Column(name = "sOrderPersonPhone")
	private String orderPersonPhone;
	
	/**
	 * 订货单位所属片区
	 */
	@Column(name = "sOrderUnitArea")
	private String orderUnitArea;
	
	/**
	 * 订货单位地址
	 */
	@Column(name = "sOrderUnitAddr")
	private String orderUnitAddr;
	
	/**
	 * 提交状态
	 */
	@Column(name="nIsSubmit")
	private Integer isSubmit;

	/**
	 * 创建人
	 * 
	 */
	@Column(name = "sCreator")
	private String creator;
	
	/**
	 * 机会关闭原因
	 */
	@Column(name = "sCloseReason")
	private String closeReason;
	
	/**
	 * 机会关闭时间
	 */
	@Column(name = "finishDate")
	private Date finishDate;
	
	/**
	 * 是否成功
	 * 
	 */
	@Column(name = "sIsSucceed")
	private String isSucceed;

	/**
	 * 相关合同号
	 * 
	 */
	@Column(name = "sContractCode")
	private String contractCode;
	
	@Column(name="sMemo")
	private String memo;

	/**
	 * user_id(创建人id)
	 */
	@ManyToOne
	@JoinColumn(unique = false)
	private User user;
	
	public Date getFinishDate() {
		return finishDate;
	}
	public void setFinishDate(Date finishDate) {
		this.finishDate = finishDate;
	}
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getSourceUnit() {
		return sourceUnit;
	}

	public void setSourceUnit(String sourceUnit) {
		this.sourceUnit = sourceUnit;
	}

	public String getSourceSuperior() {
		return sourceSuperior;
	}

	public void setSourceSuperior(String sourceSuperior) {
		this.sourceSuperior = sourceSuperior;
	}

	public String getSourceOfferInfo() {
		return sourceOfferInfo;
	}

	public void setSourceOfferInfo(String sourceOfferInfo) {
		this.sourceOfferInfo = sourceOfferInfo;
	}

	public String getProjectState() {
		return projectState;
	}

	public void setProjectState(String projectState) {
		this.projectState = projectState;
	}

	public String getDeviceState() {
		return deviceState;
	}

	public void setDeviceState(String deviceState) {
		this.deviceState = deviceState;
	}

	public String getSourcePower() {
		return sourcePower;
	}

	public void setSourcePower(String sourcePower) {
		this.sourcePower = sourcePower;
	}


	public Integer getOrderAmount() {
		return orderAmount;
	}

	public void setOrderAmount(Integer orderAmount) {
		this.orderAmount = orderAmount;
	}

	public String getOrderUnit() {
		return orderUnit;
	}

	public void setOrderUnit(String orderUnit) {
		this.orderUnit = orderUnit;
	}

	public String getCustomerId() {
		return customerId;
	}

	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}

	public String getOrderPerson() {
		return orderPerson;
	}

	public void setOrderPerson(String orderPerson) {
		this.orderPerson = orderPerson;
	}

	public String getOrderUnitArea() {
		return orderUnitArea;
	}

	public void setOrderUnitArea(String orderUnitArea) {
		this.orderUnitArea = orderUnitArea;
	}

	public String getOrderUnitAddr() {
		return orderUnitAddr;
	}

	public void setOrderUnitAddr(String orderUnitAddr) {
		this.orderUnitAddr = orderUnitAddr;
	}

	public Integer getIsSubmit() {
		return isSubmit;
	}

	public void setIsSubmit(Integer isSubmit) {
		this.isSubmit = isSubmit;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getCloseReason() {
		return closeReason;
	}

	public void setCloseReason(String closeReason) {
		this.closeReason = closeReason;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getSourceArea() {
		return sourceArea;
	}

	public void setSourceArea(String sourceArea) {
		this.sourceArea = sourceArea;
	}

	public String getSourceType() {
		return sourceType;
	}

	public void setSourceType(String sourceType) {
		this.sourceType = sourceType;
	}

	public String getOrderPersonPhone() {
		return orderPersonPhone;
	}

	public void setOrderPersonPhone(String orderPersonPhone) {
		this.orderPersonPhone = orderPersonPhone;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getChancePriority() {
		return chancePriority;
	}

	public void setChancePriority(String chancePriority) {
		this.chancePriority = chancePriority;
	}

	public String getIsSucceed() {
		return isSucceed;
	}

	public void setIsSucceed(String isSucceed) {
		this.isSucceed = isSucceed;
	}

	public String getContractCode() {
		return contractCode;
	}

	public void setContractCode(String contractCode) {
		this.contractCode = contractCode;
	}
	
}
